<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*当屏幕的宽度小于900px时触发*/
        /*  screen 电脑/平板/手机屏幕
          all 所有设备
          speech 屏幕阅读器等发声设备
          print 打印预览模式*/
        @media screen and (max-width: 900px) {
            .myDiv {
                width: 200px;
                height: 200px;
                background-color: #998877;
                color: white;
                text-align: center;
                line-height: 200px;
            }
        }
    </style>
</head>
<body>
<div class="myDiv">this is a book</div>
</body>
</html>